package com.design.movieticket.common.base.constant;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * jwt
 * */
import java.io.Serializable;

public class Result<T> implements Serializable {
    private T result;
    private String message;
    private int code;

    public Result(T result, String message, int code) {
        this.result = result;
        this.message = message;
        this.code = code;
    }

    public Result(String message, int code) {
        this.message = message;
        this.code = code;
    }

    public Result(T result, Boolean succeed, String message,int code) {
        this.result = result;
        //this.succeed = succeed;
        this.message = message;
        this.code = code;
    }

    public Result(Boolean succeed, String message) {
        this.result = null;
        //this.succeed = succeed;
        this.message = message;
    }

    public T getResult() {
        return this.result;
    }

    public void setResult(T result) {
        this.result = result;
    }

//    public Boolean getSucceed() {
//        return this.succeed;
//    }
//
//    public void setSucceed(Boolean succeed) {
//        this.succeed = succeed;
//    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String toString() {
        return "Result{result=" + this.result +  ", message='" + this.message + ", code='" + this.code + '\'' + '}';
    }
}

